package com.zfxt.biz.autoconfig;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Created by xuxing on 2018/8/31.
 */
//加载application.properties中前缀为spring.httpclient.的参数，下来的都为默认值
@ConfigurationProperties(prefix = "spring.httpclient")
public class HttpClientProperties {
    //连接超时时间
    private Integer connectTimeOut=1000;
    //指客户端从服务器读取数据的timeout，超出后会抛出SocketTimeOutException
    private Integer socketTimeOut=10000;

    private String agent="agent";
    //是单个路由连接的最大数，可以根据自己的业务需求进行设置
    private Integer maxConnPerRoute=10;

    private Integer macConnTotaol=50; //总的连接数

    public Integer getConnectTimeOut() {
        return connectTimeOut;
    }

    public void setConnectTimeOut(Integer connectTimeOut) {
        this.connectTimeOut = connectTimeOut;
    }

    public Integer getSocketTimeOut() {
        return socketTimeOut;
    }

    public void setSocketTimeOut(Integer socketTimeOut) {
        this.socketTimeOut = socketTimeOut;
    }

    public String getAgent() {
        return agent;
    }

    public void setAgent(String agent) {
        this.agent = agent;
    }

    public Integer getMaxConnPerRoute() {
        return maxConnPerRoute;
    }

    public void setMaxConnPerRoute(Integer maxConnPerRoute) {
        this.maxConnPerRoute = maxConnPerRoute;
    }

    public Integer getMacConnTotaol() {
        return macConnTotaol;
    }

    public void setMacConnTotaol(Integer macConnTotaol) {
        this.macConnTotaol = macConnTotaol;
    }
}
